package b.a.a;

import org.apache.batik.svggen.SVGStylingAttributes;
import org.apache.batik.svggen.SVGSyntax;
import org.w3c.dom.*;

import java.util.ArrayList;

final class f
  implements SVGSyntax
{
  private static final String a = ":";
  private static final String b = ";";
  private static final String c = " ";
  
  public static void a(Node paramNode, boolean paramBoolean)
  {
    boolean bool = b.k;
    NamedNodeMap localNamedNodeMap = paramNode.getAttributes();
    Object localObject2;
    if (localNamedNodeMap != null)
    {
      localObject1 = (Element)paramNode;
      StringBuffer localStringBuffer = new StringBuffer();
      j = localNamedNodeMap.getLength();
      localObject2 = new ArrayList(j);
      int k = 0;
      label220:
      do
      {
        if (k >= j) {
          break;
        }
        Attr localAttr = (Attr)localNamedNodeMap.item(k);
        String str1 = localAttr.getName();
        if (!bool)
        {
          if (bool) {
            break label234;
          }
          if (SVGStylingAttributes.set.contains(str1))
          {
            localStringBuffer.append(str1);
            localStringBuffer.append(":");
            String str2 = localAttr.getValue();
            localStringBuffer.append(str2);
            if (!bool)
            {
              if (paramBoolean)
              {
                if (bool) {
                  break label220;
                }
                if ("font-size".equals(str1))
                {
                  if (bool) {
                    break label220;
                  }
                  if (Character.isDigit(str2.charAt(str2.length() - 1))) {
                    localStringBuffer.append("px");
                  }
                }
              }
              localStringBuffer.append(";");
              localStringBuffer.append(" ");
            }
            ((ArrayList)localObject2).add(localAttr.getName());
          }
          k++;
        }
      } while (!bool);
      label234:
      if (!bool)
      {
        if (localStringBuffer.length() > 0)
        {
          ((Element)localObject1).setAttributeNS(null, "style", localStringBuffer.toString().trim());
          k = 0;
        }
      }
      else
      {
        int m = ((ArrayList)localObject2).size();
        do
        {
          if (k >= m) {
            break;
          }
          if (bool) {
            break label306;
          }
          ((Element)localObject1).removeAttribute((String)((ArrayList)localObject2).get(k));
          k++;
        } while (!bool);
      }
    }
    label306:
    Object localObject1 = paramNode.getChildNodes();
    int i = ((NodeList)localObject1).getLength();
    int j = 0;
    do
    {
      if (j >= i) {
        break;
      }
      localObject2 = ((NodeList)localObject1).item(j);
      a((Node)localObject2, paramBoolean);
      j++;
    } while (!bool);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     b.a.a.f

 * JD-Core Version:    0.7.0.1

 */